import 'package:flutter/material.dart';
import 'package:get/get.dart';

class DioDemoPage extends StatelessWidget {
  const DioDemoPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Dio 示例"),
        centerTitle: true,
      ),
      body: Center(
        child: Column(
          children: [
            ElevatedButton(
              child: const Text("DioDemoBase"),
              onPressed: () async {
                Get.toNamed("/diodemobase");
              },
            ),
            const SizedBox(height: 30),
            ElevatedButton(
              child: const Text("DioDemoBuilder"),
              onPressed: () {
                Get.toNamed("/diodemobuilder");
              },
            ),
            const SizedBox(height: 30),
            ElevatedButton(
              child: const Text("上拉&下拉Demo"),
              onPressed: () {
                Get.toNamed("/diodemoloadmore");
              },
            ),
          ],
        ),
      ),
    );
  }
}
